<template>
	<section class="section">
		<div class="item">
			<span class="left">标识：</span><span class="right">{{deviceConfigs.Identification}}</span>
		</div>
		<div class="item">
			<span class="left">设备位置：</span><span class="right">{{deviceConfigs.device_position}}</span>
		</div>
		<div class="item">
			<span class="left">设备描述：</span><span class="right">{{deviceConfigs.device_desc}}</span>
		</div>
		<div class="item">
			<span class="left">设备IP地址：</span><span class="right">{{deviceConfigs.device_ip}}</span>
		</div>
		<div class="item">
			<span class="left">设备登录密码：</span><span class="right">{{deviceConfigs.device_password}}</span>
		</div>
		<div class="item">
			<span class="left">连接串号：</span><span class="right">{{deviceConfigs.device_serial_port}}</span>
		</div>
		<div class="item">
			<span class="left">串号端口号：</span><span class="right">{{deviceConfigs.device_port}}</span>
		</div>
		<div class="item">
			<span class="left">串号波特率：</span><span class="right">{{deviceConfigs.device_baud_rate}}</span>
		</div>
		<div class="item">
			<span class="left">备注：</span><span class="right">{{deviceConfigs.remark}}</span>
		</div>
	</section>
</template>

<style scoped>
.section{
	margin-top: 40px;
	box-shadow: 1px 3px 7px rgba(0,0,0,.2);
	padding: 20px 0;
}
.item{
	line-height: 40px;
}
.item .left{
	display: inline-block;
	vertical-align: middle;
	width: 200px;
	text-align: right;
	margin-right: 20px;
	color: #999;
}
.item .right{
	display: inline-block;
	vertical-align: middle;
	color: #333;
}
</style>

<script>
	import { deviceConfigs } from '@/api/api';
	export default {
		data() {
			return {
				deviceConfigs: {},
				deviceId: '',
			}
		},
		mounted() {
			this.deviceId = this.$route.query.deviceId
			this.device_configs();
		},
		methods: {
			router(path) {
				this.$router.push(path)
			},
			//获取设备警报信息
			device_configs() {
				deviceConfigs(this.deviceId, 'GET').then((res) => {
					this.deviceConfigs = res.data.data
				});
			},
		}
	}

</script>